package tt.dz.order.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import tt.dz.order.dao.SysApplicationContextAware;

/**
 * 
 * 
 * @name 系统配置信息
 * @author Anson
 * @version 1.0
 * @summary
 * @desc 将当前所需要的配置信息，全都配置到同一个地方，方便获取
 *
 */
@Component
public class OrderAppConfig {

	/**
	 * 静态方法获取当前配置bean
	 * 
	 * @return
	 */
	public static final OrderAppConfig GET() {
		return SysApplicationContextAware.getBean(OrderAppConfig.class);
	}

	@Value(value = "${jdbc.url}")
	private String jdbcUrl;
	@Value(value = "${jdbc.driverClassName}")
	private String jdbcDriverClassName;
	@Value(value = "${jdbc.username}")
	private String jdbcUsername;
	@Value(value = "${jdbc.password}")
	private String jdbcPassword;
	@Value(value = "${jdbc.maxActive}")
	private String jdbcMaxActive;
	@Value(value = "${jdbc.initialSize}")
	private String jdbcInitialSize;
	@Value(value = "${jdbc.maxWait}")
	private String jdbcMaxWait;
	@Value(value = "${jdbc.minIdle}")
	private String jdbcMinIdle;
	@Value(value = "${jdbc.timeBetweenEvictionRunsMillis}")
	private String jdbcTimeBetweenEvictionRunsMillis;
	@Value(value = "${jdbc.minEvictableIdleTimeMillis}")
	private String jdbcMinEvictableIdleTimeMillis;
	@Value(value = "${jdbc.validationQuery}")
	private String jdbcValidationQuery;
	@Value(value = "${jdbc.testWhileIdle}")
	private String jdbcTestWhileIdle;
	@Value(value = "${jdbc.testOnBorrow}")
	private String jdbcTestOnBorrow;
	@Value(value = "${jdbc.testOnReturn}")
	private String jdbcTestOnReturn;
	@Value(value = "${jdbc.poolPreparedStatements}")
	private String jdbcPoolPreparedStatements;
	@Value(value = "${jdbc.maxPoolPreparedStatementPerConnectionSize}")
	private String jdbcMaxPoolPreparedStatementPerConnectionSize;
	@Value(value = "${jdbc.filters}")
	private String jdbcFilters;

	@Value(value = "${redis.host}")
	private String redisHost;
	@Value(value = "${redis.port}")
	private String redisPort;
	@Value(value = "${redis.password}")
	private String redisPassword;

	@Value(value = "${redis.minIdle}")
	private String redisMinIdle;
	@Value(value = "${redis.maxIdle}")
	private String redisMaxIdle;
	@Value(value = "${redis.maxActive}")
	private String redisMaxActive;
	@Value(value = "${redis.maxWait}")
	private String redisMaxWait;
	@Value(value = "${redis.testOnBorrow}")
	private String redisTestOnBorrow;

	// RPC Cofig
	@Value(value = "${rpc.self.port}")
	private String rpcSelfPort;
	@Value(value = "${rpc.oms.ip}")
	private String rpcOmsIp;
	@Value(value = "${rpc.oms.port}")
	private String rpcOmsPort;

	@Value(value = "${rpc.ms.ip}")
	private String rpcMsIp;
	@Value(value = "${rpc.ms.port}")
	private String rpcMsPort;

	// 系统默认的运营商编码
	@Value(value = "${merchant.code}")
	private String merchantCode;

	// 运行模式
	// 运行模式:debug,调试;test,测试;release:正式版
	@Value(value = "${runtime.mode}")
	private String runtimeMode;

	// 系统图标配置
	// 服务器系统配置的log地址
	@Value(value = "${logo.dir}")
	private String logoDir;

	// alipay config
	// 合作者身份ID，签约的支付宝账号对应的支付宝唯一用户号。以2088开头的16位纯数字组成
	@Value(value = "${alipay.partner}")
	private String alipayPartner;
	// 卖家支付宝账号
	@Value(value = "${alipay.sellerEmail}")
	private String alipaySellerEmail;
	// 卖家用户ID，卖家支付宝账号对应的支付宝唯一用户号。以2088开头的纯16位数字
	@Value(value = "${alipay.sellerUserId}")
	private String alipaySellerUserId;
	// 商户的私钥
	@Value(value = "${alipay.partnerPrivateKey}")
	private String alipayPartnerPrivateKey;

	// 不用发送台账的卡类型
	@Value(value = "${accounting.notSend.cardType}")
	private String accountingNotSendCardType;
	// 不用发送台账的卡类型
	@Value(value = "${accounting.notSend.appId}")
	private String accountingNotSendAppId;

	public String getJdbcUrl() {
		return jdbcUrl;
	}

	public String getJdbcDriverClassName() {
		return jdbcDriverClassName;
	}

	public String getJdbcUsername() {
		return jdbcUsername;
	}

	public String getJdbcPassword() {
		return jdbcPassword;
	}

	public String getJdbcMaxActive() {
		return jdbcMaxActive;
	}

	public String getJdbcInitialSize() {
		return jdbcInitialSize;
	}

	public String getJdbcMaxWait() {
		return jdbcMaxWait;
	}

	public String getJdbcMinIdle() {
		return jdbcMinIdle;
	}

	public String getJdbcTimeBetweenEvictionRunsMillis() {
		return jdbcTimeBetweenEvictionRunsMillis;
	}

	public String getJdbcMinEvictableIdleTimeMillis() {
		return jdbcMinEvictableIdleTimeMillis;
	}

	public String getJdbcValidationQuery() {
		return jdbcValidationQuery;
	}

	public String getJdbcTestWhileIdle() {
		return jdbcTestWhileIdle;
	}

	public String getJdbcTestOnBorrow() {
		return jdbcTestOnBorrow;
	}

	public String getJdbcTestOnReturn() {
		return jdbcTestOnReturn;
	}

	public String getJdbcPoolPreparedStatements() {
		return jdbcPoolPreparedStatements;
	}

	public String getJdbcMaxPoolPreparedStatementPerConnectionSize() {
		return jdbcMaxPoolPreparedStatementPerConnectionSize;
	}

	public String getJdbcFilters() {
		return jdbcFilters;
	}

	public String getRedisHost() {
		return redisHost;
	}

	public String getRedisPort() {
		return redisPort;
	}

	public String getRedisPassword() {
		return redisPassword;
	}

	public String getRedisMinIdle() {
		return redisMinIdle;
	}

	public String getRedisMaxIdle() {
		return redisMaxIdle;
	}

	public String getRedisMaxActive() {
		return redisMaxActive;
	}

	public String getRedisMaxWait() {
		return redisMaxWait;
	}

	public String getRedisTestOnBorrow() {
		return redisTestOnBorrow;
	}

	public String getRpcSelfPort() {
		return rpcSelfPort;
	}

	public String getRpcOmsIp() {
		return rpcOmsIp;
	}

	public String getRpcOmsPort() {
		return rpcOmsPort;
	}

	public String getRpcMsIp() {
		return rpcMsIp;
	}

	public String getRpcMsPort() {
		return rpcMsPort;
	}

	public String getMerchantCode() {
		return merchantCode;
	}

	public String getLogoDir() {
		return logoDir;
	}

	public String getAlipayPartner() {
		return alipayPartner;
	}

	public String getAlipaySellerEmail() {
		return alipaySellerEmail;
	}

	public String getAlipaySellerUserId() {
		return alipaySellerUserId;
	}

	public String getAlipayPartnerPrivateKey() {
		return alipayPartnerPrivateKey;
	}



	public String getRuntimeMode() {
		return runtimeMode;
	}

	public String getAccountingNotSendCardType() {
		return accountingNotSendCardType;
	}

	public String getAccountingNotSendAppId() {
		return accountingNotSendAppId;
	}

	
}
